CREATE TABLE `SRRisk`.`MsgOptionPositionRecordV5` (
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'ends with ''$n'' if an MH allocation fraction (n = 1-N) [MMH segment number]',
`okey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'ends with ''$n'' if an MH allocation fraction (n = 1-N) [MMH segment number]',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'ends with ''$n'' if an MH allocation fraction (n = 1-N) [MMH segment number]',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ends with ''$n'' if an MH allocation fraction (n = 1-N) [MMH segment number]',
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ends with ''$n'' if an MH allocation fraction (n = 1-N) [MMH segment number]',
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ends with ''$n'' if an MH allocation fraction (n = 1-N) [MMH segment number]',
`okey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'ends with ''$n'' if an MH allocation fraction (n = 1-N) [MMH segment number]',
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'ends with ''$n'' if an MH allocation fraction (n = 1-N) [MMH segment number]',
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`riskSession` ENUM('Regular','PostClose') NOT NULL DEFAULT 'Regular',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm',
`riskServerCode` VARCHAR(6) NOT NULL DEFAULT '',
`aggGroup` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned agg group',
`fkey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'underlying future (if written on a future)',
`fkey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'underlying future (if written on a future)',
`fkey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'underlying future (if written on a future)',
`fkey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'underlying future (if written on a future)',
`fkey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'underlying future (if written on a future)',
`fkey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'underlying future (if written on a future)',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'underlying ticker',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'underlying ticker',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'underlying ticker',
`exType` ENUM('None','American','European','Asian','Cliquet') NOT NULL DEFAULT 'None',
`multihedge` ENUM('None','Simple','Complex','AllCash','Binary','Fragment') NOT NULL DEFAULT 'None',
`multihedgeSource_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'MH Ticker Key (starts with ''_'') (if exists)',
`multihedgeSource_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'MH Ticker Key (starts with ''_'') (if exists)',
`multihedgeSource_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'MH Ticker Key (starts with ''_'') (if exists)',
`multihedgePVRatio` FLOAT NOT NULL DEFAULT 0 COMMENT 'pv multiplier (fraction of underlier value (uPerCn x uPrc) / SUM(uPerCn x uPrc) associated with this fragment',
`optionType` ENUM('None','Equity','Index','Future','Binary','Warrant','Flex','MapError') NOT NULL DEFAULT 'None',
`cashOnEx` FLOAT NOT NULL DEFAULT 0 COMMENT 'cash on settlement (multihedge)',
`strikeRatio` FLOAT NOT NULL DEFAULT 0 COMMENT 'strike ratio',
`uPrcRatio` FLOAT NOT NULL DEFAULT 0 COMMENT 'stock price multiplier',
`underliersPerCn` INT NOT NULL DEFAULT 0 COMMENT 'underliers per contract',
`underlierType` ENUM('None','Equity','Other','FX') NOT NULL DEFAULT 'None' COMMENT 'type of underlier (affects $greek calculations)',
`tickValue` FLOAT NOT NULL DEFAULT 0 COMMENT '$NLV value of a single tick change in display premium (pointValue = tickValue / tickSize)',
`pointValue` FLOAT NOT NULL DEFAULT 0 COMMENT '$NLV value of a single point change in display premium (pointValue = tickValue / tickSize)',
`pointCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`priceFormat` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'option price display format code',
`uPriceFormat` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'underlier price display format code',
`uPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current underlier price (any market session) (persists if market closed/halted)',
`uBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current underlier bid (any market session) (zero if market closed/halted)',
`uAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current underlier ask (any market session) (zero if market closed/halted)',
`uMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current underlier mark (usually mid market) (freezes at SR CloseMarkTime)',
`uMarkSource` ENUM('None','OpenMark','CloseMark','Print','LiveQuote','QuoteBound') NOT NULL DEFAULT 'None',
`optBid` FLOAT NOT NULL DEFAULT 0 COMMENT 'current option market bid (any market session) (zero if market closed/halted)',
`optAsk` FLOAT NOT NULL DEFAULT 0 COMMENT 'current option market ask (any market session) (zero if market closed/halted)',
`optMidMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current option mark (mid market) (freezes at SR CloseMarkTime)',
`optVolMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current option mark (volatility surface) (freezes at SR CloseMarkTime)',
`uOpnMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'start-of-day SR underlier mark (rotated from prior day record) [corp action adjusted]',
`optOpnVolMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'start-of-day SR vol mark [corp action adjusted]',
`optOpnMidMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'start-of-day SR mid mark [corp action adjusted]',
`optOpnClrMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'start-of-day clearing mark [should be corp action adjusted]',
`optOpnPosPrv` INT NOT NULL DEFAULT 0 COMMENT 'start-of-day SR contract position (rotated from prior day record) [corp action adjusted]',
`optOpnPosClr` INT NOT NULL DEFAULT 0 COMMENT 'start-of-day CKR contract position (supplied by client/clearing firm via clearing position load) [should be corp action adjusted]',
`optOpnPos` INT NOT NULL DEFAULT 0 COMMENT 'start of period contract position (effective; can be from either CLR or SR)',
`optOpnPosSrc` ENUM('None','Zero','SR','CLR') NOT NULL DEFAULT 'None' COMMENT 'start of period position source',
`cnBot` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts bot today',
`cnSld` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts sld today',
`cnOpened` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts opened today',
`cnClosed` INT NOT NULL DEFAULT 0 COMMENT 'number of contracts closed today',
`edgeOpened` FLOAT NOT NULL DEFAULT 0 COMMENT 'edge from opening trades (model #1)',
`edgeClosed` FLOAT NOT NULL DEFAULT 0 COMMENT 'edge from closing trades (model #1)',
`trdDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'deltas from trades (fixed at the time of trade)',
`trdGamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'gamma from trades (fixed at the time of trade)',
`trdDeltaMny` FLOAT NOT NULL DEFAULT 0 COMMENT 'deltas x uPrc from trades (fixed at the time of trade)',
`optMnyBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'sum of settle cash for all buy executions',
`optMnySld` DOUBLE NOT NULL DEFAULT 0 COMMENT 'sum of settle cash for all sell executions',
`dayPnl` FLOAT NOT NULL DEFAULT 0,
`dnDayPnl` FLOAT NOT NULL DEFAULT 0,
`opnPnlMidMark` FLOAT NOT NULL DEFAULT 0,
`opnPnlVolMark` FLOAT NOT NULL DEFAULT 0,
`opnPnlClrMark` FLOAT NOT NULL DEFAULT 0,
`cnNetOpnPos` INT NOT NULL DEFAULT 0 COMMENT 'opening position (cnOpnPos) net of reversals/conversions',
`cnNetCurPos` INT NOT NULL DEFAULT 0 COMMENT 'current position (cnOpnPos + cnBot - cnSld) net of reversals/conversions',
`cnAtmEquiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'current position (atm equivalent contracts: (cnNetPos * ve / atmVega)',
`beta` FLOAT NOT NULL DEFAULT 0 COMMENT 'beta (usually beta to SPX; see AccountConfig.betaSource)',
`betaSource` ENUM('None','betaSPX','betaQQQ','betaIWM','clientBeta') NOT NULL DEFAULT 'None',
`divDays` SMALLINT NOT NULL DEFAULT 0 COMMENT 'days to the next dividend (0 = exDate is today, -1 = exDate is yesterday)',
`hedgeDeltaRule` ENUM('None','IVol','IvS','TVol','TvS','Binary','IvS_25','IvS_50','IvS_75','TvAll','TvAllS') NOT NULL DEFAULT 'None' COMMENT 'HedgeDelta Source (IVol = use SR implied surface (sticky strike), IvS = use SR surface (sticky delta), TVol = use user supplied theo surface (sticky strike), TvS = use user supplied theo surface and atm veSlope (sticky delta)) [AccountConfig.hedgeDelta]',
`binaryDays` FLOAT NOT NULL DEFAULT 0 COMMENT 'hedgeDelta = -1.0,-0.5,0,+0.5,+1.0 if less than binary days to expiration;usually [0.0 - 2.0]',
`days` SMALLINT NOT NULL DEFAULT 0 COMMENT 'days to expiration',
`years` FLOAT NOT NULL DEFAULT 0 COMMENT 'years to expiration',
`rate` FLOAT NOT NULL DEFAULT 0 COMMENT 'global rate to expiration (pricing)',
`sdiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'continuous stock div (pricing)',
`ddiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'present value of discrete dividends (pricing)',
`dadj` FLOAT NOT NULL DEFAULT 0 COMMENT 'dadj frational dividend value; 1.0 except for some multihedge roots',
`atmVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'live surface atm volatility',
`atmVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'live surface atm vega',
`smny` FLOAT NOT NULL DEFAULT 0 COMMENT 'option moneyness',
`iVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'surface volatility',
`iVolSrc` ENUM('None','NbboMid','SRVol','LoBound','HiBound','Other') NOT NULL DEFAULT 'None',
`de` FLOAT NOT NULL DEFAULT 0 COMMENT 'delta;(dOpx / dUPrc)',
`ga` FLOAT NOT NULL DEFAULT 0 COMMENT 'gamma;(dDelta / dUPrc)',
`th` FLOAT NOT NULL DEFAULT 0 COMMENT 'theta;(dOpx / dTime)',
`ve` FLOAT NOT NULL DEFAULT 0 COMMENT 'vega;(dOpx / dVol)',
`rh` FLOAT NOT NULL DEFAULT 0 COMMENT 'rho;(dOpx / dRate)',
`ph` FLOAT NOT NULL DEFAULT 0 COMMENT 'phi;(dOpx / dSDiv)',
`vo` FLOAT NOT NULL DEFAULT 0 COMMENT 'volga (SR surface)',
`va` FLOAT NOT NULL DEFAULT 0 COMMENT 'vanna (SR surface)',
`deDecay` FLOAT NOT NULL DEFAULT 0 COMMENT 'delta decay, charm, delta bleed; (dDelta/dTime)',
`err` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'computation error code (if any)',
`veSlope` FLOAT NOT NULL DEFAULT 0 COMMENT 'ivol correlation (veSlope = dVol / dUPrc) [can be either SR surface veSlope or client theo veSlope]',
`hedgeDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'hedge delta (either ivol or tvol based;follows binary rules)',
`hedgeGa` FLOAT NOT NULL DEFAULT 0 COMMENT 'hedge gamma (either ivol or tvol based;follows binary rules)',
`srSlope` FLOAT NOT NULL DEFAULT 0 COMMENT 'ivol correlation (srSlope = dVol / dUPrc) [always SR surface veSlope]',
`isBinary` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'hedge delta/gamma has switched to ''binary''',
`premOvPar` FLOAT NOT NULL DEFAULT 0 COMMENT 'premium over parity for the option position',
`xde` FLOAT NOT NULL DEFAULT 0 COMMENT 'xdelta (C: +0.5 - de, P: -0.5 - de)',
`loBound` FLOAT NOT NULL DEFAULT 0 COMMENT 'minimum no-arb opx (zero volatility given sdiv/ddiv/years/rate)',
`su90` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 90%, sticky delta',
`sd90` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 90%, sticky delta',
`su50` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 50%, sticky delta',
`sd50` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 50%, sticky delta',
`su15` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 15%, sticky delta',
`sd15` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 15%, sticky delta',
`su10` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 10%, sticky delta',
`sd10` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 10%, sticky delta',
`su06` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 6%, sticky delta',
`sd08` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 8%, sticky delta',
`su05` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 5%, sticky delta',
`sd05` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 5%, sticky delta',
`su1e` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 1x implied earn move, vol ramp out, delta-neutral',
`sd1e` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 1x implied earn move, vol ramp out, delta-neutral',
`su2e` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 2x implied earn move, vol ramp out, delta-neutral',
`sd2e` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier dn 2x implied earn move, vol ramp out, delta-neutral',
`earn` FLOAT NOT NULL DEFAULT 0 COMMENT 'vol earn ramp out (no underlier move)',
`cash` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier up 30%, vol = 0.10, 6mn deal close',
`theoModel` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'theo model #1',
`tVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo volatility',
`tOpx` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo price',
`tBOpnPx` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo buy/open price',
`tSOpnPx` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo sell/open price',
`tBClsPx` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo buy/close price',
`tSClsPx` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo sell/close price',
`tDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo delta',
`tGa` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo gamma',
`tErr` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'theo vol error code (TheoError)',
`theoModel2` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'theo model #2 (used for edge markup)',
`tVol2` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo volatility (model #2)',
`tOpx2` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo price (model #2)',
`tErr2` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'theo vol error code (model #2)',
`yearsPr` FLOAT NOT NULL DEFAULT 0,
`ratePr` FLOAT NOT NULL DEFAULT 0,
`sdivPr` FLOAT NOT NULL DEFAULT 0,
`ddivPr` FLOAT NOT NULL DEFAULT 0,
`iVolPr` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period surface volatility',
`dePr` FLOAT NOT NULL DEFAULT 0,
`gaPr` FLOAT NOT NULL DEFAULT 0,
`thPr` FLOAT NOT NULL DEFAULT 0,
`vePr` FLOAT NOT NULL DEFAULT 0,
`rhPr` FLOAT NOT NULL DEFAULT 0,
`phPr` FLOAT NOT NULL DEFAULT 0,
`voPr` FLOAT NOT NULL DEFAULT 0,
`vaPr` FLOAT NOT NULL DEFAULT 0,
`errPr` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'prior period computation error code (if any)',
`veSlopePr` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period veSlope',
`hedgeDePr` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period hedge delta',
`tVolPr` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo volatility (theoModel)',
`tOpxPr` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo price',
`tDePr` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo delta',
`tVolPr2` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo volatility (theoModel#2)',
`tOpxPr2` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo price',
`tDePr2` FLOAT NOT NULL DEFAULT 0 COMMENT 'prior period theo delta',
`xdePr` FLOAT NOT NULL DEFAULT 0,
`marginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn, vol dn',
`marginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn, vol up',
`marginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up, vol dn',
`marginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up, vol up',
`opnPnlDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * hedgeDe * dUPrc',
`opnPnlGa` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * 0.5 * optGamma * dUPrc * dUPrc',
`opnPnlTh` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * optTheta * dTime',
`opnPnlVe` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * optVega * dVol',
`opnPnlVo` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * 0.5 * optVolga * dVol * dVol',
`opnPnlVa` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * optVanna * dVol * dUPrc',
`opnPnlSl` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * vol/uPrc * slope * optVega * dUPrc',
`opnPnlRate` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * optRho * dRate',
`opnPnlSDiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * optPhi * dSDv',
`opnPnlDDiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * optPhi * dDDv',
`opnPnlSv` FLOAT NOT NULL DEFAULT 0 COMMENT 'open position * mult * (SR Vol Pnl - opnPnlDe)',
`opnPnlErr` FLOAT NOT NULL DEFAULT 0 COMMENT 'unattributed pnl: SR Vol Pnl - opnPnlDe - opnPnlGa - opnPnlTh - opnPnlVe - opnPnlRat - opnPnlSDiv - opnPnlDDiv',
`shBotC0` INT NOT NULL DEFAULT 0 COMMENT 'hypothetical shares bot (~1/minute intervals)',
`shSldC0` INT NOT NULL DEFAULT 0 COMMENT 'hypothetical shares sld',
`shMnyC0` FLOAT NOT NULL DEFAULT 0 COMMENT 'hypothetical money',
`shBotC1` INT NOT NULL DEFAULT 0 COMMENT 'hypothetical shares bot (~10/minute intervals)',
`shSldC1` INT NOT NULL DEFAULT 0 COMMENT 'hypothetical shares sld',
`shMnyC1` FLOAT NOT NULL DEFAULT 0 COMMENT 'hypothetical money',
`markErrCodes` VARCHAR(255) NOT NULL DEFAULT 'None',
`exValue` FLOAT NOT NULL DEFAULT 0 COMMENT 'early exercise value (amLimit - bsPrice)',
`riskAlert` ENUM('None','ExerciseNow','ExBeforeNextDiv','ExAfterNextDiv','ExBeforeFutureDiv','ExAfterFutureDiv','ExDivCall','ExAskSoon','ExAskNow','ExSurfSoon','ExSurfNow','ExBidSoon','ExBidNow') NOT NULL DEFAULT 'None',
`numExecutions` INT NOT NULL DEFAULT 0 COMMENT 'number of included SpdrParentExecution records',
`maxExecDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'maximum activity dttm of execution records included in this option risk summary',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`okey_tk`,`okey_yr`,`okey_mn`,`okey_dy`,`okey_xx`,`okey_cp`,`okey_at`,`okey_ts`,`accnt`,`tradeDate`,`riskSession`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='OptionPositionRecords are live risk records that contain start-of-day positions and all subsequent executions, including executions reported as done away.\nThese records are published by a CoreRiskServer and represent the position and risk markup detail for a single option series.\nNew records are published immediately when a position changes and about once per minute if no position has changed.\nNote that all records for a single underlier are published simultaneously and records for the same chain should have consistent marks.';